﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace WcfFlashRemoting.Example3.Implementation
{
    [ServiceBehavior(Namespace = "urn:WcfFlashRemoting:Examples:Example3")]
    class ItemCheckService : Contract.IItemCheckContract
    {
        #region IItemCheckContract Members

        public Contract.StockData GetItemData(Contract.ItemDescription item)
        {
            return new Contract.StockData()
            {
                Name = item.Name,
                Price = 15.00,
                Quantity = 0
            };
        }

        public Contract.StockData[] GetAllItemData()
        {
            return new Contract.StockData[] {
                new Contract.StockData { Name = "MSFT", Price = 14.00, Quantity = 4 },
                new Contract.StockData { Name = "ADB", Price = 20.00, Quantity = 6 }
            };
        }

        #endregion
    }
}
